import request from "@/router/axios";
import {EDUCATION_PREFIX} from "@/store/constant";

export const getCheckDataList = (params) => {
  return request({
    url: EDUCATION_PREFIX + '/homework-detail/checkdata-list',
    method: 'get',
    params: {
      ...params
    }
  })
}

export const getSubmittedList = (params) => {
  return request({
    url: EDUCATION_PREFIX + '/homework-detail/submitted-list',
    method: 'get',
    params: {
      ...params
    }
  })
}

export const checkSubmit = (row) => {
  return request({
    url: EDUCATION_PREFIX + '/homework-detail/check-submit',
    method: 'post',
    data: row
  })
}

export const getScoreDataList = (current, size, params) => {
  return request({
    url: EDUCATION_PREFIX + '/homework-detail/scoredata-list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const updateScoreData = (data) => {
  return request({
    url: EDUCATION_PREFIX + '/homework-detail/update-score',
    method: 'post',
    data: data
  })
}
